/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Conexao;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
/**
 *
 * @author 
 */
public class Conexao {
    
    private static final String url = "jdbc:mysql://localhost:3306/Hotelaria";
    private static final String usuario = "root";
    private static final String senha = "password@2014";
    
    public static Connection conectar() throws SQLException{
        try{
            return DriverManager.getConnection(url, usuario, senha);
        }catch (SQLException se){
            throw new SQLException("Erro ao conectar o Banco de dados!" +se.getMessage() );
        }
    }
    
}
